package com.jk.controller;

import com.jk.dto.TemBoard;
import com.jk.pojo.ResponseResult;
import com.jk.service.TemBoardServiceFeign;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yzf
 * @version 1.0
 * @ClassName TemBoardController
 * @program: office
 * @description: TODO
 * @date 2025/2/18 15:35
 */
@Api(tags = "确认入职")
@Slf4j
@RestController
@RequestMapping("/board")
public class TemBoardController {
    @Autowired
    private TemBoardServiceFeign temBoardServiceFeign;

    @ApiOperation(value = "确认入职",httpMethod = "POST",notes = "确认入职")
    @RequestMapping("/addBoard")
    public ResponseResult addBoard(@RequestBody TemBoard temBoard) {

        try {
            temBoardServiceFeign.addBoard(temBoard);
            return new ResponseResult(200,"确认入职成功");
        } catch (Exception e) {
            e.printStackTrace();
            return new ResponseResult(500,"确认入职失败");

        }
    }

}
